<?
require(PATH_CLASS."model.php");
class Form extends Model{
	public function setOptionForm(){
		parent::setModelOptionFormName("จัดการข้อมูลนักเรียน");
		$button = array("form"=>"displayForm()","table"=>"displayTable()","minimize"=>"hideForm('".THIS_CLASS."')");
		parent::setModelOptionFormButton($button);
	}
	
	public function setFieldSet(){
		
		$fieldSet =  array(
							"aa"=>"FieldSet1",
							"bb1"=>"กำปั้นกับไม้มาลัยค้ำจุล"
						);

		//parent::setModelFieldSet($fieldSet);
	}
	
	public function setButtonControlInput(){
		$arrayButton = array(
							"btn_save"=>array(
												"บันทึกข้อมูล",
												"submit"
											),
							"btn_close"=>array(
												"ออก",
												"button",
												"loadTab(".$this->tab.",'testModel','view')"
											)
							);
		//parent::setModelButtonControlInput($arrayButton);
	}
	
	public function setButtonControlOutput(){
		$arrayButton = array("btn_edit"=>array("แก้ไขข้อมูล","button","loadTab(".$this->tab.",'testModel','form')"));
		//parent::setModelButtonControlOutput($arrayButton);
	}
	
	public function setInput(){
		$arrayInput["input"] = '<div id="mm"></div>';
		$arrayInput["required"] = true;
		$Input["NONE"][] = $arrayInput;
				
		parent::setModelInput($Input);
	}

	public function setValidate(){
		
	}

	public function setOutput(){
		$arrayOutput["label"] = 'ชื่อ';
		$arrayOutput["labelWidth"] = 15;
		$arrayOutput["output"] = 22222222222;
		$arrayOutput["inputWidth"] = 85;
		$Output["NONE"][] = $arrayOutput;

		$arrayOutput["label"] = 'ชื่อ1';
		$arrayOutput["labelWidth"] = 15;
		$arrayOutput["output"] = 555555;
		$arrayOutput["outputWidth"] = 85;
		$Output["NONE"][] = $arrayOutput;	

		//parent::setModelOutput($Output);
	}

	public function insertData(){
		/*$about_id = Database::getLastValue('about','about_id')+1;
		$arrayInsertData = array("about_id"=>$about_id,
								"about_name"=>$_POST["aa"]
								);
		$query = Database::getInsertData($arrayInsertData,"about");
		//echo $query = Database::getUpdateData($arrayInsertData,"about","about_id=4");
		Database::query($query);
		//echo $query;*/
	}
}
?>

